3.398 \(\int \sec ^6(c+d x) (a+b \sin (c+d x))^2 \, dx\)

Optimal. Leaf size=103 \[ \frac{\left (4 a^2-b^2\right ) \tan ^3(c+d x)}{15 d}+\frac{\left (4 a^2-b^2\right ) \tan (c+d x)}{5 d}+\frac{a b \sec ^3(c+d x)}{5 d}+\frac{\sec ^5(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{5 d} \]

[Out]

(a*b*Sec[c + d*x]^3)/(5*d) + (Sec[c + d*x]^5*(b + a*Sin[c + d*x])*(a + b*Sin[c + d*x]))/(5*d) + ((4*a^2 - b^2)
*Tan[c + d*x])/(5*d) + ((4*a^2 - b^2)*Tan[c + d*x]^3)/(15*d)

________________________________________________________________________________________

Rubi [A]  time = 0.101227, antiderivative size = 103, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {2691, 2669, 3767} \[ \frac{\left (4 a^2-b^2\right ) \tan ^3(c+d x)}{15 d}+\frac{\left (4 a^2-b^2\right ) \tan (c+d x)}{5 d}+\frac{a b \sec ^3(c+d x)}{5 d}+\frac{\sec ^5(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))}{5 d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^6*(a + b*Sin[c + d*x])^2,x]

[Out]

(a*b*Sec[c + d*x]^3)/(5*d) + (Sec[c + d*x]^5*(b + a*Sin[c + d*x])*(a + b*Sin[c + d*x]))/(5*d) + ((4*a^2 - b^2)
*Tan[c + d*x])/(5*d) + ((4*a^2 - b^2)*Tan[c + d*x]^3)/(15*d)

Rule 2691

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> -Simp[((g*C
os[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^(m - 1)*(b + a*Sin[e + f*x]))/(f*g*(p + 1)), x] + Dist[1/(g^2*(p + 1
)), Int[(g*Cos[e + f*x])^(p + 2)*(a + b*Sin[e + f*x])^(m - 2)*(b^2*(m - 1) + a^2*(p + 2) + a*b*(m + p + 1)*Sin
[e + f*x]), x], x] /; FreeQ[{a, b, e, f, g}, x] && NeQ[a^2 - b^2, 0] && GtQ[m, 1] && LtQ[p, -1] && (IntegersQ[
2*m, 2*p] || IntegerQ[m])

Rule 2669

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[(b*(g*Cos[
e + f*x])^(p + 1))/(f*g*(p + 1)), x] + Dist[a, Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x]
&& (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin{align*} \int \sec ^6(c+d x) (a+b \sin (c+d x))^2 \, dx &=\frac{\sec ^5(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{5 d}-\frac{1}{5} \int \sec ^4(c+d x) \left (-4 a^2+b^2-3 a b \sin (c+d x)\right ) \, dx\\ &=\frac{a b \sec ^3(c+d x)}{5 d}+\frac{\sec ^5(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{5 d}-\frac{1}{5} \left (-4 a^2+b^2\right ) \int \sec ^4(c+d x) \, dx\\ &=\frac{a b \sec ^3(c+d x)}{5 d}+\frac{\sec ^5(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{5 d}-\frac{\left (4 a^2-b^2\right ) \operatorname{Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (c+d x)\right )}{5 d}\\ &=\frac{a b \sec ^3(c+d x)}{5 d}+\frac{\sec ^5(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))}{5 d}+\frac{\left (4 a^2-b^2\right ) \tan (c+d x)}{5 d}+\frac{\left (4 a^2-b^2\right ) \tan ^3(c+d x)}{15 d}\\ \end{align*}

Mathematica [A]  time = 0.433124, size = 84, normalized size = 0.82 \[ \frac{\sec ^5(c+d x) \left (20 \left (2 a^2+b^2\right ) \sin (c+d x)+5 \left (4 a^2-b^2\right ) \sin (3 (c+d x))+4 a^2 \sin (5 (c+d x))+48 a b-b^2 \sin (5 (c+d x))\right )}{120 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^6*(a + b*Sin[c + d*x])^2,x]

[Out]

(Sec[c + d*x]^5*(48*a*b + 20*(2*a^2 + b^2)*Sin[c + d*x] + 5*(4*a^2 - b^2)*Sin[3*(c + d*x)] + 4*a^2*Sin[5*(c +
d*x)] - b^2*Sin[5*(c + d*x)]))/(120*d)

________________________________________________________________________________________

Maple [A]  time = 0.056, size = 92, normalized size = 0.9 \begin{align*}{\frac{1}{d} \left ( -{a}^{2} \left ( -{\frac{8}{15}}-{\frac{ \left ( \sec \left ( dx+c \right ) \right ) ^{4}}{5}}-{\frac{4\, \left ( \sec \left ( dx+c \right ) \right ) ^{2}}{15}} \right ) \tan \left ( dx+c \right ) +{\frac{2\,ab}{5\, \left ( \cos \left ( dx+c \right ) \right ) ^{5}}}+{b}^{2} \left ({\frac{ \left ( \sin \left ( dx+c \right ) \right ) ^{3}}{5\, \left ( \cos \left ( dx+c \right ) \right ) ^{5}}}+{\frac{2\, \left ( \sin \left ( dx+c \right ) \right ) ^{3}}{15\, \left ( \cos \left ( dx+c \right ) \right ) ^{3}}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^6*(a+b*sin(d*x+c))^2,x)

[Out]

1/d*(-a^2*(-8/15-1/5*sec(d*x+c)^4-4/15*sec(d*x+c)^2)*tan(d*x+c)+2/5*a*b/cos(d*x+c)^5+b^2*(1/5*sin(d*x+c)^3/cos
(d*x+c)^5+2/15*sin(d*x+c)^3/cos(d*x+c)^3))

________________________________________________________________________________________

Maxima [A]  time = 0.976974, size = 103, normalized size = 1. \begin{align*} \frac{{\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} a^{2} +{\left (3 \, \tan \left (d x + c\right )^{5} + 5 \, \tan \left (d x + c\right )^{3}\right )} b^{2} + \frac{6 \, a b}{\cos \left (d x + c\right )^{5}}}{15 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6*(a+b*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

1/15*((3*tan(d*x + c)^5 + 10*tan(d*x + c)^3 + 15*tan(d*x + c))*a^2 + (3*tan(d*x + c)^5 + 5*tan(d*x + c)^3)*b^2
 + 6*a*b/cos(d*x + c)^5)/d

________________________________________________________________________________________

Fricas [A]  time = 2.10586, size = 173, normalized size = 1.68 \begin{align*} \frac{6 \, a b +{\left (2 \,{\left (4 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} +{\left (4 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 3 \, a^{2} + 3 \, b^{2}\right )} \sin \left (d x + c\right )}{15 \, d \cos \left (d x + c\right )^{5}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6*(a+b*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

1/15*(6*a*b + (2*(4*a^2 - b^2)*cos(d*x + c)^4 + (4*a^2 - b^2)*cos(d*x + c)^2 + 3*a^2 + 3*b^2)*sin(d*x + c))/(d
*cos(d*x + c)^5)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**6*(a+b*sin(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.11975, size = 244, normalized size = 2.37 \begin{align*} -\frac{2 \,{\left (15 \, a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{9} + 30 \, a b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{8} - 20 \, a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} + 20 \, b^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} + 58 \, a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 8 \, b^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 60 \, a b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 20 \, a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 20 \, b^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 15 \, a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 6 \, a b\right )}}{15 \,{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )}^{5} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6*(a+b*sin(d*x+c))^2,x, algorithm="giac")

[Out]

-2/15*(15*a^2*tan(1/2*d*x + 1/2*c)^9 + 30*a*b*tan(1/2*d*x + 1/2*c)^8 - 20*a^2*tan(1/2*d*x + 1/2*c)^7 + 20*b^2*
tan(1/2*d*x + 1/2*c)^7 + 58*a^2*tan(1/2*d*x + 1/2*c)^5 + 8*b^2*tan(1/2*d*x + 1/2*c)^5 + 60*a*b*tan(1/2*d*x + 1
/2*c)^4 - 20*a^2*tan(1/2*d*x + 1/2*c)^3 + 20*b^2*tan(1/2*d*x + 1/2*c)^3 + 15*a^2*tan(1/2*d*x + 1/2*c) + 6*a*b)
/((tan(1/2*d*x + 1/2*c)^2 - 1)^5*d)